From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:15 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 11:13:16 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 13 11:13:16 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0001.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 13 15:13:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0002.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 13 15:21:08 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 16:00:42 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0003.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 13 16:00:43 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 20:01:24 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:24 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:24 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 13 20:01:24 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0004.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 13 20:01:25 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 13 20:01:26 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 08:02:10 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:10 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 08:02:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 08:02:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 14 08:02:10 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:10 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0005.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 14 08:02:11 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0006.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 14 12:00:40 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0007.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 16:00:38 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 14 16:00:39 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0008.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 14 20:00:35 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0009.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 15 08:01:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 15 12:00:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0010.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 15 12:00:45 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:45 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:45 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 12:00:45 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 15 12:00:45 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0011.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 15 16:00:39 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 15 20:00:35 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0012.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 15 20:00:36 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 16 08:02:22 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 16 08:02:23 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0013.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 16 08:02:23 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:23 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:23 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 08:02:23 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 16 08:02:23 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 12:00:41 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0014.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 16 12:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 16:00:38 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:38 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 16:00:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0015.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 16:00:39 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 16 16:00:40 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0016.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 16 20:00:35 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 08:02:23 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0017.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 17 08:02:24 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0018.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 17 12:00:52 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0019.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 17 16:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0020.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 17 20:00:43 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 17 20:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 18 08:04:05 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 18 08:04:06 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 18 08:04:06 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 18 08:04:06 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 18 08:04:06 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Jan 18 08:04:07 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0021.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Jan 18 08:04:07 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:07 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:07 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 08:04:07 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 18 08:04:07 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 12:00:54 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0022.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 18 12:00:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 18 16:01:15 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 18 16:01:16 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 18 16:01:16 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Jan 18 16:01:16 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0023.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Jan 18 16:01:16 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:16 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:16 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 16:01:16 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 18 16:01:16 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0024.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 18 20:00:45 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 18 20:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 08:04:25 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:25 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 08:04:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 08:04:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 19 08:04:26 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 19 08:04:27 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Jan 19 08:04:27 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0025.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Jan 19 08:04:27 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:27 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:27 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 08:04:27 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 19 08:04:28 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 12:00:54 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0026.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 19 12:00:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 16:02:30 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:30 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 16:02:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 16:02:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 19 16:02:31 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 19 16:02:32 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Jan 19 16:02:32 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0027.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Jan 19 16:02:32 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:32 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:32 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 16:02:32 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 19 16:02:32 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0028.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 19 20:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 08:06:08 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 20 08:06:09 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 20 08:06:12 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0029.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 20 08:06:12 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:12 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:12 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 08:06:13 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 20 08:06:13 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 12:01:44 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 12:01:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 12:01:45 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 20 12:01:46 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 20 12:01:46 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 20 12:01:46 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 20 12:01:46 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 20 12:01:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 20 12:01:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0030.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 20 12:01:47 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:47 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 12:01:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 20 12:01:48 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0031.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 20 16:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0032.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 20 20:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 08:03:38 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:38 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 08:03:38 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 21 08:03:39 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 21 08:03:41 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0033.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 21 08:03:41 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:41 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:42 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 08:03:42 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 21 08:03:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 12:00:55 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0034.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 21 12:00:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0035.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 21 16:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0036.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 21 20:00:40 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:41 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:41 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 21 20:00:41 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 21 20:00:41 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 22 08:02:32 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 22 08:02:33 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0037.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 22 08:02:33 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:33 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:33 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 08:02:33 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 22 08:02:33 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 22 12:00:43 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 22 12:00:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0038.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 22 12:00:44 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:44 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:44 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 12:00:44 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 22 12:00:45 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 16:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 16:01:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 16:01:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 16:01:03 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 16:01:03 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 22 16:01:03 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 22 16:01:03 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 22 16:01:04 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 22 16:01:07 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 22 16:01:07 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 22 16:01:07 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0039.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 22 16:01:07 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:08 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:08 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 16:01:08 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 22 16:01:08 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 20:01:02 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0040.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 22 20:01:05 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0041.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 08:02:25 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 23 08:02:26 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0042.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 23 12:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 16:01:29 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:29 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 23 16:01:30 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 23 16:01:31 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 23 16:01:31 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0043.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 23 16:01:31 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:31 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:32 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 16:01:32 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 23 16:01:32 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0044.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 23 20:00:45 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 08:02:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 08:02:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 08:02:54 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 08:02:54 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 24 08:02:54 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 24 08:02:54 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 24 08:02:54 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 24 08:02:54 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 24 08:02:54 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 24 08:02:57 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0045.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 24 08:02:57 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:57 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 08:02:57 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 24 08:02:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 12:02:27 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:28 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:28 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 12:02:28 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 12:02:28 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:28 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 24 12:02:28 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:28 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:28 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:28 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 12:02:28 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0046.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:29 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 12:02:30 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 24 12:02:30 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 16:01:09 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:10 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0047.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 24 16:01:11 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 24 20:01:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 24 20:01:43 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0048.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 24 20:01:43 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:43 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:43 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 24 20:01:43 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 24 20:01:43 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 25 08:01:50 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 25 08:01:51 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 25 08:01:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Jan 25 08:01:52 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0049.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Jan 25 08:01:52 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:52 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:52 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 08:01:52 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 25 08:01:52 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0050.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 25 12:00:52 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 16:00:50 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0051.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 25 16:00:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0052.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Jan 25 20:00:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 08:05:02 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:02 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 08:05:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 26 08:05:03 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Jan 26 08:05:06 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0053.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Jan 26 08:05:06 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:06 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:06 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 08:05:06 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 26 08:05:07 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 12:00:57 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:57 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 12:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 12:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Jan 26 12:00:57 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0054.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:59 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 12:00:59 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 26 12:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 16:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0055.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 26 16:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0056.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Jan 26 20:00:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 08:06:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 27 08:06:03 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 27 08:06:04 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0057.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 27 08:06:04 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:05 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:05 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 08:06:05 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 27 08:06:05 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 12:01:56 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 12:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 27 12:01:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 27 12:01:58 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0058.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 27 12:01:58 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:58 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 12:01:58 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 27 12:01:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 16:00:57 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:57 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0059.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 27 16:00:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Jan 27 20:00:45 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 27 20:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Jan 27 20:00:46 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0060.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Jan 27 20:00:46 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:46 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Jan 27 20:00:46 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Jan 27 20:00:49 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 08:05:10 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 28 08:05:11 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 28 08:05:13 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0061.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 28 08:05:13 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:13 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:13 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 08:05:13 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 28 08:05:13 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 12:01:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0062.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 28 12:01:48 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 16:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0063.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 28 16:00:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 20:00:48 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:48 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Jan 28 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Jan 28 20:00:48 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:48 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0064.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Jan 28 20:00:49 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 08:06:48 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:48 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 08:06:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 08:06:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 29 08:06:48 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 29 08:06:49 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 29 08:06:51 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0065.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 29 08:06:51 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:51 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 08:06:51 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 29 08:06:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 12:00:48 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:48 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 12:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 12:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 29 12:00:51 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 29 12:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 29 12:00:54 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0066.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 29 12:00:54 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:54 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:54 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 12:00:54 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 29 12:00:54 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 29 16:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 29 16:00:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0067.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 29 16:00:47 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:47 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 16:00:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 29 16:00:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 20:00:47 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:47 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Jan 29 20:00:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0068.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Jan 29 20:00:48 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 08:07:20 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:20 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:20 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 08:07:20 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 08:07:20 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:20 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 30 08:07:20 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 30 08:07:21 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 30 08:07:22 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 30 08:07:25 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0069.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 30 08:07:25 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:25 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:25 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 08:07:26 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 30 08:07:27 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 12:03:33 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 30 12:03:34 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 30 12:03:35 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0070.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 30 12:03:35 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:35 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:35 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 12:03:35 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 30 12:03:36 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 30 16:03:48 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 30 16:03:49 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 30 16:03:49 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 30 16:03:50 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0071.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 30 16:03:50 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:50 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:50 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 16:03:50 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 30 16:03:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Jan 30 20:01:56 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 30 20:01:57 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 30 20:01:57 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Jan 30 20:01:57 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Jan 30 20:01:57 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 30 20:01:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Jan 30 20:01:57 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0072.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Jan 30 20:01:57 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:58 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Jan 30 20:01:58 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Jan 30 20:01:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 08:07:18 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 31 08:07:19 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 31 08:07:20 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 31 08:07:20 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 31 08:07:20 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 31 08:07:23 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0073.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 31 08:07:23 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:23 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:23 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 08:07:23 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 31 08:07:23 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 12:03:54 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:54 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 12:03:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 12:03:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 31 12:03:54 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:54 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 31 12:03:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 31 12:03:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0074.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 31 12:03:56 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:56 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 12:03:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 31 12:03:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 16:01:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 16:01:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:01:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 16:01:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 16:01:58 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 16:01:58 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 31 16:01:58 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 31 16:01:58 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 31 16:01:58 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 31 16:01:58 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 31 16:02:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 31 16:02:01 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0075.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 31 16:02:01 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:01 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:01 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 16:02:01 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 31 16:02:01 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 20:00:56 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Jan 31 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Jan 31 20:00:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0076.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Jan 31 20:00:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 08:09:05 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 1 08:09:06 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 1 08:09:08 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0077.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 1 08:09:08 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:08 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:08 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 08:09:08 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 1 08:09:08 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 12:02:23 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:23 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 1 12:02:23 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:23 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 1 12:02:24 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 1 12:02:25 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0078.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 1 12:02:25 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:25 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:25 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 12:02:25 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 1 12:02:25 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0079.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 1 16:00:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0080.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 1 20:00:46 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 1 20:00:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 08:11:15 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:17 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 08:11:18 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:18 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 08:11:18 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 08:11:18 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 08:11:18 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 2 08:11:18 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 2 08:11:18 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 2 08:11:18 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 2 08:11:18 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 2 08:11:18 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Feb 2 08:11:21 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0081.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Feb 2 08:11:21 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:21 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:21 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 08:11:21 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 2 08:11:22 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 2 12:02:29 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Feb 2 12:02:31 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0082.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Feb 2 12:02:31 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:31 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:31 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 12:02:31 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 2 12:02:32 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0083.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Feb 2 16:00:59 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:00 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 16:01:00 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 2 16:01:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 20:00:51 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 2 20:00:52 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 2 20:00:53 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 2 20:00:53 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 2 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Feb 2 20:00:53 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0084.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Feb 2 20:00:53 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:53 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 2 20:00:53 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 2 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 08:10:39 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:41 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 08:10:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 08:10:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Feb 3 08:10:41 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:41 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:41 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 3 08:10:42 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Feb 3 08:10:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0085.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Feb 3 08:10:47 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:48 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:48 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 08:10:48 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 3 08:10:49 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 12:02:18 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:18 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:18 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 12:02:18 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 3 12:02:19 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Feb 3 12:02:20 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0086.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Feb 3 12:02:20 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:20 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:20 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 12:02:20 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 3 12:02:20 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0087.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 3 16:00:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 20:00:53 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:53 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 3 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Feb 3 20:00:53 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:53 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0088.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 3 20:00:54 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 08:06:43 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 08:06:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 08:06:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Feb 4 08:06:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:45 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 08:06:45 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 4 08:06:46 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Feb 4 08:06:50 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0089.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Feb 4 08:06:50 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:51 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 08:06:51 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 4 08:06:52 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 12:02:19 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:19 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Feb 4 12:02:19 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:19 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 4 12:02:20 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Feb 4 12:02:22 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0090.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Feb 4 12:02:22 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:22 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:22 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 12:02:22 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 4 12:02:23 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 16:01:01 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:01 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 16:01:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 16:01:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:01 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Feb 4 16:01:01 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:01 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0091.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 4 16:01:02 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 20:00:53 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 4 20:00:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Feb 4 20:00:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0092.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Feb 4 20:00:56 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:56 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 4 20:00:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 4 20:00:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 08:07:11 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 5 08:07:12 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 5 08:07:13 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 5 08:07:13 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Feb 5 08:07:15 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0093.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Feb 5 08:07:15 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:15 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:15 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 08:07:15 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 5 08:07:18 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 12:02:22 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:22 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 12:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 12:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:22 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Feb 5 12:02:22 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 5 12:02:23 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Feb 5 12:02:24 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0094.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Feb 5 12:02:24 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:24 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:24 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 12:02:24 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 5 12:02:24 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0095.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 5 16:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 20:00:52 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:52 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 5 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Feb 5 20:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0096.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 5 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 08:11:53 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:58 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 08:11:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 08:11:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Feb 6 08:11:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 08:11:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 08:11:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:11:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 08:12:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 08:12:00 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 08:12:00 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 6 08:12:01 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 6 08:12:01 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 6 08:12:01 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 6 08:12:02 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 6 08:12:02 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Feb 6 08:12:17 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0097.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Feb 6 08:12:18 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:12:18 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:12:18 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 08:12:18 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 6 08:12:21 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 12:02:18 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 6 12:02:19 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Feb 6 12:02:20 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0098.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Feb 6 12:02:20 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:20 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:20 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 12:02:21 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 6 12:02:21 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 16:00:50 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:50 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Feb 6 16:00:50 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:50 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0099.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Feb 6 16:00:51 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:55 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 16:00:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 6 16:00:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 20:00:52 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0100.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 6 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 08:17:55 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:58 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 08:17:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 08:17:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Feb 7 08:17:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:17:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 08:18:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:18:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 08:18:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:18:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 08:18:01 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 08:18:01 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 08:18:01 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 7 08:18:01 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 7 08:18:01 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 7 08:18:01 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 7 08:18:01 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 7 08:18:01 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Feb 7 08:18:15 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0101.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Feb 7 08:18:15 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:18:16 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:18:16 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 08:18:17 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 7 08:18:21 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 12:02:53 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 7 12:02:54 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Feb 7 12:02:55 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0102.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Feb 7 12:02:55 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:55 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 12:02:55 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 7 12:02:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0103.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 16:00:58 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 7 16:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 7 20:00:58 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 7 20:00:59 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 7 20:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Feb 7 20:00:59 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0104.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Feb 7 20:00:59 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:59 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 7 20:00:59 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 7 20:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 08:19:29 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:30 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 08:19:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 08:19:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 8 08:19:31 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:31 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 08:19:31 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:31 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 08:19:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 08:19:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 08:19:32 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 08:19:33 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 8 08:19:33 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 8 08:19:33 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 8 08:19:33 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 8 08:19:33 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 8 08:19:34 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 8 08:19:46 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0105.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 8 08:19:47 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:47 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 08:19:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 8 08:19:49 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 12:02:45 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 12:02:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 12:02:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 12:02:47 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 12:02:47 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 8 12:02:47 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 8 12:02:47 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 8 12:02:47 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 8 12:02:47 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 8 12:02:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 8 12:02:48 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0106.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 8 12:02:48 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:48 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:48 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 12:02:48 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 8 12:02:49 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0107.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 8 16:01:03 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 8 20:00:52 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 8 20:00:53 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 8 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 8 20:00:53 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0108.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 8 20:00:53 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:53 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 8 20:00:53 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 8 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 08:07:58 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:58 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 08:07:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 08:07:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:07:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Feb 9 08:07:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 9 08:08:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Feb 9 08:08:03 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0109.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Feb 9 08:08:03 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:08:03 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:08:03 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 08:08:03 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 9 08:08:04 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 12:02:32 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 9 12:02:33 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Feb 9 12:02:37 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0110.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Feb 9 12:02:37 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:37 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:37 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 12:02:37 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 9 12:02:38 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0111.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:07 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:08 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 16:01:08 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 9 16:01:08 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0112.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 9 20:00:59 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 9 20:01:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 08:15:42 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:45 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 08:15:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 08:15:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Feb 10 08:15:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:46 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:46 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 08:15:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:46 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 08:15:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:15:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 08:15:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 08:15:54 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 08:15:54 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 10 08:15:54 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 10 08:15:56 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 10 08:15:56 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 10 08:15:56 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 10 08:16:07 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Feb 10 08:16:22 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0113.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Feb 10 08:16:22 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:16:22 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:16:23 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 08:16:25 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 10 08:16:29 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 12:03:06 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:06 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 12:03:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 12:03:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 10 12:03:07 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Feb 10 12:03:10 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0114.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Feb 10 12:03:11 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:11 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:11 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 12:03:11 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 10 12:03:11 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 16:00:58 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:58 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:59 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:00:59 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 10 16:01:00 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 10 16:01:01 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 10 16:01:01 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 10 16:01:01 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Feb 10 16:01:01 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0115.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Feb 10 16:01:01 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:01 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:01 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 16:01:01 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 10 16:01:01 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0116.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Feb 10 20:01:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 08:11:55 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 08:11:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 08:11:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Feb 11 08:11:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 08:11:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 08:11:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:11:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 08:11:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 08:11:57 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 08:11:57 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 11 08:11:57 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 11 08:11:58 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 11 08:11:58 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 11 08:11:58 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 11 08:11:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Feb 11 08:12:00 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0117.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Feb 11 08:12:00 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:00 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 08:12:00 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 11 08:12:01 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 11 12:02:17 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Feb 11 12:02:18 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0118.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Feb 11 12:02:18 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:18 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:18 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 12:02:18 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 11 12:02:19 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 16:00:55 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0119.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 11 16:00:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 20:00:49 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0120.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sat Feb 11 20:00:50 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 08:08:19 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:19 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 08:08:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 08:08:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:19 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Feb 12 08:08:20 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:20 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:20 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:20 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 08:08:20 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:20 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 08:08:20 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:20 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 08:08:21 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 08:08:21 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 08:08:21 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 12 08:08:21 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 12 08:08:21 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 12 08:08:21 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 12 08:08:21 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 12 08:08:21 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Feb 12 08:08:24 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0121.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Feb 12 08:08:24 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:24 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:24 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 08:08:24 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 12 08:08:25 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 12:02:23 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 12:02:24 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 12:02:24 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 12:02:24 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 12 12:02:24 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 12 12:02:24 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 12 12:02:24 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 12 12:02:24 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 12 12:02:24 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Feb 12 12:02:25 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0122.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Feb 12 12:02:25 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:25 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:25 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 12:02:25 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 12 12:02:26 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0123.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 16:00:57 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 12 16:00:58 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 20:00:55 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0124.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Sun Feb 12 20:00:56 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 08:15:05 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:07 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 08:15:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 08:15:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:07 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Feb 13 08:15:07 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:07 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 08:15:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 08:15:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 08:15:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 08:15:09 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 08:15:09 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 13 08:15:09 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 13 08:15:09 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 13 08:15:09 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 13 08:15:09 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 13 08:15:09 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Feb 13 08:15:21 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0125.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Feb 13 08:15:21 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:21 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:21 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 08:15:21 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 13 08:15:23 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 12:02:34 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:34 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 12:02:34 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 12:02:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Feb 13 12:02:35 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:35 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:35 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 12:02:35 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 13 12:02:36 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Feb 13 12:02:37 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0126.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Feb 13 12:02:37 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:37 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:37 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 12:02:37 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 13 12:02:37 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0127.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:13 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 16:01:14 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 13 16:01:14 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 13 20:00:52 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Mon Feb 13 20:00:53 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0128.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Mon Feb 13 20:00:53 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:53 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Mon Feb 13 20:00:53 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Mon Feb 13 20:00:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 08:17:02 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:02 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:03 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 08:17:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 08:17:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:05 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Feb 14 08:17:05 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:06 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:06 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 08:17:06 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:06 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 08:17:06 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:06 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 08:17:06 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 08:17:06 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 08:17:07 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 14 08:17:07 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 14 08:17:07 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 14 08:17:07 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 14 08:17:07 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 14 08:17:07 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Feb 14 08:17:16 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0129.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Feb 14 08:17:16 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:17 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:17 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 08:17:17 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 14 08:17:19 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 14 12:02:53 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Feb 14 12:02:55 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0130.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Feb 14 12:02:55 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:55 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 12:02:55 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 14 12:02:55 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0131.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 14 16:01:18 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0132.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Tue Feb 14 20:01:00 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 08:22:27 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:30 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 08:22:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 08:22:30 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 15 08:22:31 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:31 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:31 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 08:22:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 08:22:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:22:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 08:22:32 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 08:22:32 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 08:22:32 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 15 08:22:32 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 15 08:22:33 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 15 08:22:33 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 15 08:22:33 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 15 08:22:33 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 15 08:23:05 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0133.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 15 08:23:05 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:23:06 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:23:06 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 08:23:06 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 15 08:23:13 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 12:04:42 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:42 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 12:04:42 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 15 12:04:43 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 15 12:04:45 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0134.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 15 12:04:45 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:47 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:47 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 12:04:47 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 15 12:04:48 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:16 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0135.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 16:01:17 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 15 16:01:22 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 19:27:53 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:53 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 19:27:53 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0136.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 15 19:27:54 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 15 20:12:08 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 15 20:12:09 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Wed Feb 15 20:12:09 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Wed Feb 15 20:12:09 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 15 20:12:09 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Wed Feb 15 20:12:13 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0137.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Wed Feb 15 20:12:13 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:13 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:13 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Wed Feb 15 20:12:13 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Wed Feb 15 20:12:13 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 16 08:41:41 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:43 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:44 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Thu Feb 16 08:41:44 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 16 08:41:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:45 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Thu Feb 16 08:41:47 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:47 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:47 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 16 08:41:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:47 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 16 08:41:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:41:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Thu Feb 16 08:41:48 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 16 08:41:48 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Thu Feb 16 08:41:48 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 16 08:41:48 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 16 08:41:49 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Thu Feb 16 08:41:49 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Thu Feb 16 08:41:49 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 16 08:41:50 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Thu Feb 16 08:42:08 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0138.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Thu Feb 16 08:42:08 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:42:08 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:42:10 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Thu Feb 16 08:42:10 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Thu Feb 16 08:42:13 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > > From krissepu at vip.fi Sat Aug 3 23:50:31 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] Is this possible ? References: <3D419BD7.46F95A39@vip.fi> <3D426AD6.7050004@lemburg.com> <3D459635.129291C2@vip.fi> <3D459971.5030207@lemburg.com> Message-ID: <3D4C3407.CC74698F@vip.fi> Ok, I did as you told: -- code starts -- from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', MatchOk, 'nesting'), 'nesting', ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', MatchFail, MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist -- code ends -- There remains one quirk (see code above): The code stops searching whenever there is an extra ) -sign in the middle of text. How can I make the engine to return nothing (i.e. empty match) if there are extra ) -sign AND it is not recursing currently ? Should we have a parameter: "Fail if not currently recursing" ? Try adding ) -sign after X -letter and then after Y -letter in text above. In both cases the result should be an empty match. This is a matter of taste, I agree, but then one could always say: "It did not find anything, because of the number of (- and )- signs did not add up". => one python error message that I could print when MatchFail happens => less analysing to do => more speed. In code above only extra ( -signs make engine fail. -pekka- "M.-A. Lemburg" wrote: > Pekka Niiranen wrote: > > Fine, > > > > but the line: > > > > (None,EOF,Here,MatchOk) > > > > will make text = "aa(AA" match too. If I analysed it correctly, > > it is because EOF matches allways. Would it be possible > > to add mxTextTool parameter that will make EOF cause failing if necessary ? > > > > Something like: "if EOF is encountered here, fail the whole subgroup ?" > > EOF only matches iff the head position is beyond the right slice > of the text slice being processed. If you need balanced parens, > you should rewrite the tab tables to have the nesting table match > both the opening and the closing paren. > > > -pekka- > > > > > > "M.-A. Lemburg" wrote: > > > > > >>Pekka Niiranen wrote: > >> > >>>Hi, > >>> > >>> I tried the latest beta 3 by: > >>> > >>> a) compiling it myself from sources and > >>> b) installing from the precompiled package for python v2.2 > >>> > >>> Of the scripts below only the script that uses Simpleparse returns > >>>anything. > >>> The others run without errors, but return []. > >>> > >>> They all run OK with the beta 2 though. > >> > >>If they did, then you've hit a bug in beta2. Here are the corrected > >>versions. Note that the problem was with the EOF handling. If AllNotIn > >>doesn't match at least one char it'll fail and using 0 as jne offset > >>causes the same effect as MatchFail. > >> > >>#--- solution 1 starts (with limiting letters)--- > >> > >>from mx.TextTools import * > >> > >>def test1(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tables = [] # used for recursion only > >> > >> tab = ('start', > >> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" then recurse > >> (None,Is,')',+1,MatchOk), # If current character is ")" then stop or return from recursion > >> (None,AllNotIn,'()',+1,'start'), # Search all characters except "(" and ")" > >> (None,EOF,Here,MatchOk), > >> 'nesting', > >> ('group',SubTable+AppendMatch, > >> ((None,Is,'(',MatchFail,+1), # Since we have looked ahead, collect "(" -sign > >> (None,SubTableInList, (tables,0)), # Recurse > >> ) > >> ), > >> (None,Jump,To,'start')) # After recursion jump back to 'start' > >> > >> tables.append(tab) # Add tab to tables > >> > >> result, taglist, nextindex = tag(text,tab) > >> print result, nextindex > >> print taglist > >> > >>#--- solution 2 starts (without limiting letters) --- > >> > >>def test2(): > >> > >> text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >> > >> tab = ('start', > >> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is seen stop recursion > >> (None, Is, '(', 'letters', +1), > >> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >> (None, Skip, 1, MatchFail, 'start'), # Last character in recursion was ")" so jump over it back to 'start' > >> 'letters', > >> (None, AllNotIn, '()', +1, 'start'), # Collect all characters except "(" and ")" > >> (None, EOF, Here, MatchOk), > >> ) > >> > >> result,taglist,nextindex = tag(text, tab) > >> print result, nextindex > >> print taglist > >> > >>print 'Test 1:' > >>test1() > >>print > >> > >>print 'Test 2:' > >>test2() > >>print > >> > >> > >>> I am using Windows 2000 professional, Python 2.2.1 and Winpython > >>>v148. > >>> > >>>-pekka- > >>> > >>> > >>>Pekka Niiranen wrote: > >>> > >>> > >>> > >>>>Thank you all for your help and inspiration! It is payback time ;) > >>>> > >>>>I have tried past two months to create parser that returns > >>>>strings limited by two different letters. The strings can be nested. > >>>>I considered recursive call of regular expression to be too slow > >>>>and decided to use mxTextTools 2.1 beta2 and the latest alpha of > >>>>Simpleparse 2.0. > >>>> > >>>>Below are three solutions I found. > >>>>Note that Simpleparse creates different tagtable as the "manually" > >>>>found. > >>>> > >>>>Further ideas to be implemented: > >>>> > >>>>1) Input of limiting letters as parameters (easy) > >>>>2) Unicode support > >>>>3) Test for equal amount of limiting letters before calling of parser > >>>>(will this speed up the solution ?) > >>>>4) Parsing one line at a time without looping thru lines of the text > >>>>with "while" or "for" > >>>> (maybe "None, AllNotIn, '()\n'" ) > >>>> > >>>>One development idea to mxTextTools: > >>>> > >>>>1) Instead of using list of tables to recurse, would it be possible to > >>>>use "global jump" to outside of current table ? > >>>> > >>>>--- solution 1 starts (with limiting letters)--- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>>tables = [] # used for recursion only > >>>> > >>>>tab = ('start', > >>>> (None,Is+LookAhead,'(',+1,'nesting'), # If next character is "(" > >>>>then recurse > >>>> (None,Is,')',+1,MatchOk), # If current character is ")" then stop > >>>>or return from recursion > >>>> (None,AllNotIn,'()',0,'start'), # Search all characters except > >>>>"(" and ")" > >>>> 'nesting', > >>>> ('group',SubTable+AppendMatch,((None,Is,'(',0,+1), # Since we > >>>>have looked ahead, collect "(" -sign > >>>> (None,SubTableInList, > >>>>(tables,0)))), # Recurse > >>>> (None,Jump,To,'start')) # After recursion jump back to 'start' > >>>> > >>>>tables.append(tab) # Add tab to tables > >>>> > >>>>if __name__ == '__main__': > >>>> > >>>> result, taglist, nextindex = tag(text,tab) > >>>> print taglist > >>>> > >>>>--- solution 1 ends --- > >>>> > >>>>--- solution 2 starts (without limiting letters) --- > >>>> > >>> > >>>>from mx.TextTools import * > >>> > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>tab = ('start', > >>>> (None, Is+LookAhead, ')', +1, MatchOk), # When character ")" is > >>>>seen stop recursion > >>>> (None, Is, '(', 'letters', +1), > >>>> ('group', SubTable+AppendMatch, ThisTable), # Recurse > >>>> (None, Skip, 1, 0, 'start'), # Last character in recursion was > >>>>")" so jump over it back to 'start' > >>>> 'letters', > >>>> (None, AllNotIn, '()', 0, 'start')) # Collect all characters > >>>>except "(" and ")" > >>>> > >>>>result,taglist,next = tag(text, tab) > >>>>print taglist > >>>> > >>>>--- solution 2 ends --- > >>>> > >>>>--- solution 3 starts (Simpleparse solution) --- > >>>> > >>> > >>>>from simpleparse.parser import Parser > >>>>from mx.TextTools import * > >>> > >>>>declaration = r''' > >>>> > >>>> > >>>>>line< := (a/match)+ > >>>> > >>>>match := '(', line, ')' > >>>> := -[()] > >>>>''' > >>>>text = "aa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aa" > >>>> > >>>>parser = Parser(declaration) > >>>>success, children, nextcharacter = parser.parse(text, production = > >>>>"line") > >>>>print_tags(text,children) > >>>> > >>>>--- solution 3 ends --- > >>>> > >>>>-pekka- > >>> > >>> > >>> > >>>_______________________________________________________________________ > >>>eGenix.com User Mailing List http://www.egenix.com/ > >>>http://lists.egenix.com/mailman/listinfo/egenix-users > >> > >>-- > >>Marc-Andre Lemburg > >>CEO eGenix.com Software GmbH > >>_______________________________________________________________________ > >>eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > >>Python Consulting: http://www.egenix.com/ > >>Python Software: http://www.egenix.com/files/python/ > >> > >>_______________________________________________________________________ > >>eGenix.com User Mailing List http://www.egenix.com/ > >>http://lists.egenix.com/mailman/listinfo/egenix-users > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:13:08 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 Message-ID: <3D52C2C4.1080800@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 4 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Thu Aug 8 22:26:18 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] BeeDict setting keys/comparison to shelve References: <6FDE0867413DD21182BF00A0C97251920EA8CEBD@MSWG4> Message-ID: <3D52C5DA.5000409@lemburg.com> John.N.1@bwc.state.oh.us wrote: > Does anyone have comments on using Bdict instead of a standard shelf or > bsddb ver3? > > Also, on Win2k, for me to change a dictionary element w/Bdict, I need to > first delete the key and then set it's value. > Should that be the case? > > When I run: > > d = mx.BeeBase.BeeDict.BeeDict('c:/tmp/test-BeeDict2') > print 'original',d['Marc9'] > d['Marc9']='betty1' > d.commit() > print 'dict change\t',d.changed(),d['Marc9'] > > del(d['Marc9']) > d.commit() > d['Marc9']='betty2' > print 'del dict change\t',d.changed(),d['Marc9'] > d.close() > > > produces: > > original Sveta > dict change 0 Sveta > del dict change 1 betty2 FYI, with egenix-mx-base 2.1.0b4 I get: import mx.BeeBase.BeeDict def test(): d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') d['Marc9']='Sveta' d.commit() d.close() d = mx.BeeBase.BeeDict.BeeDict('testjohn.dat') print 'original',d['Marc9'] d['Marc9']='betty1' d.commit() print 'dict change\t',d.changed(),d['Marc9'] del(d['Marc9']) d.commit() d['Marc9']='betty2' print 'del dict change\t',d.changed(),d['Marc9'] d.close() test() ... original Sveta dict change 0 betty1 del dict change 1 betty2 Note that the 0 on the first change line indicates that there are no changes in the cache (because you have called .commit() on the line before). The second change line still has the change in the cache, so 1 is returned and the .close() will roll back the transaction. HTH, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From Jim.Vickroy at noaa.gov Thu Aug 8 14:41:46 2002 From: Jim.Vickroy at noaa.gov (Jim Vickroy) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52C97A.7661C06@noaa.gov> When I try to download the MS Windows binary installer for Python 2.2, I am prompted for a name and password. "M.-A. Lemburg" wrote: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 > > Here is a new beta release of the 2.1.0 base package. It contains > a number of small bug fixes, esp. in the mxTextTools package > (most of these were found by Mike C. Fletcher who uses it in > his SimpleParse package), adds better support for applications > which embed Python and adds a new clause to the license which > allows integrating third party software under different licenses. > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > Thanks, > -- > Marc-Andre Lemburg > CEO eGenix.com Software GmbH > _______________________________________________________________________ > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > Python Consulting: http://www.egenix.com/ > Python Software: http://www.egenix.com/files/python/ > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From krissepu at vip.fi Thu Aug 8 23:47:48 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CAE3.F4D92A92@vip.fi> I am prompted too and my egenix's userlist username+password do not work.. Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. > > "M.-A. Lemburg" wrote: > > > eGenix.com mx BASE Extension Package for Python > > Version 2.1.0 beta 4 > > > > Here is a new beta release of the 2.1.0 base package. It contains > > a number of small bug fixes, esp. in the mxTextTools package > > (most of these were found by Mike C. Fletcher who uses it in > > his SimpleParse package), adds better support for applications > > which embed Python and adds a new clause to the license which > > allows integrating third party software under different licenses. > > > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py1.5.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.0.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.1.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.win32-py2.2.exe > > http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.zip > > > > Thanks, > > -- > > Marc-Andre Lemburg > > CEO eGenix.com Software GmbH > > _______________________________________________________________________ > > eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... > > Python Consulting: http://www.egenix.com/ > > Python Software: http://www.egenix.com/files/python/ > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > http://lists.egenix.com/mailman/listinfo/egenix-users > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users From mal at lemburg.com Thu Aug 8 22:51:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> Message-ID: <3D52CBDA.2050603@lemburg.com> Jim Vickroy wrote: > When I try to download the MS Windows binary installer for Python 2.2, I am > prompted for a name and password. Oh dear. Same mistake as last time... > "M.-A. Lemburg" wrote: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 >> >>Here is a new beta release of the 2.1.0 base package. It contains >>a number of small bug fixes, esp. in the mxTextTools package >>(most of these were found by Mike C. Fletcher who uses it in >>his SimpleParse package), adds better support for applications >>which embed Python and adds a new clause to the license which >>allows integrating third party software under different licenses. Here are the correct URLs: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b4.zip Sorry, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From bhoel at web.de Thu Aug 8 23:02:26 2002 From: bhoel at web.de (Berthold =?iso-8859-15?q?H=F6llmann?=) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 In-Reply-To: <3D52C2C4.1080800@lemburg.com> References: <3D52C2C4.1080800@lemburg.com> Message-ID: "M.-A. Lemburg" writes: > eGenix.com mx BASE Extension Package for Python > Version 2.1.0 beta 4 Hello, Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz => `egenix-mx-base-2.1.0b4.tar.gz' Resolving www.egenix.com... done. Connecting to www.egenix.com[217.115.138.139]:80... connected. HTTP request sent, awaiting response... 401 Authorization Required Authorization failed. I Authorization really needed? Cheers Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad. From mal at lemburg.com Thu Aug 8 23:05:15 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] Re: ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> Message-ID: <3D52CEFB.2050704@lemburg.com> Berthold H?llmann wrote: > "M.-A. Lemburg" writes: > > >> eGenix.com mx BASE Extension Package for Python >> Version 2.1.0 beta 4 > > > Hello, > > Trying to download egenix-mx-base-2.1.0b4.tar.gz I get > > >>env LANG=C wget http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > > --22:01:59-- http://www.egenix.com/files/python/beta/egenix-mx-base-2.1.0b4.tar.gz > => `egenix-mx-base-2.1.0b4.tar.gz' > Resolving www.egenix.com... done. > Connecting to www.egenix.com[217.115.138.139]:80... connected. > HTTP request sent, awaiting response... 401 Authorization Required > Authorization failed. > > I Authorization really needed? No the URL was wrong... try without hthe /beta/. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 11:02:05 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b4 References: <3D52C2C4.1080800@lemburg.com> <3D52C97A.7661C06@noaa.gov> <3D52CBDA.2050603@lemburg.com> Message-ID: <3D5376FD.7060206@lemburg.com> I just noted that there seems to be a problem in the install_data command of mxSetup.py. As a result, the data files will always be placed in the $prefix directory, which is /usr/local or \PythonX.X on Windows. I guess there's no other way to fix this than to ship yet another beta version, since pretty much all archives posted yesterday have this problem... lucky that I'm not on vacation until next Wednesday :-) I'll post a new set later today. Sorry for the mixups, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Fri Aug 9 13:14:21 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] ANN: eGenix.com mx BASE Extension Package 2.1.0b5 Message-ID: <3D5395FD.10709@lemburg.com> eGenix.com mx BASE Extension Package for Python Version 2.1.0 beta 5 Here is a new beta release of the 2.1.0 base package. It contains a number of small bug fixes, esp. in the mxTextTools package (most of these were found by Mike C. Fletcher who uses it in his SimpleParse package), adds better support for applications which embed Python and adds a new clause to the license which allows integrating third party software under different licenses. Beta 5 fixes a bug in the installation scripts which caused the included text and support files to be installed in the $prefix directory rather than under site-packages. These are the available download links: http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py1.5_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.0_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.1_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.i386.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5-py2.2_1.src.rpm http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.tar.gz http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py1.5.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.0.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.1.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.win32-py2.2.exe http://www.egenix.com/files/python/egenix-mx-base-2.1.0b5.zip Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 12:07:16 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> For various reasons I'd like to get my hands on a debug build of mxDateTime for Windows for Python 1.5.2. I've downloaded the source and successfully compiled the regular release version, but I don't see any obvious way to get it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with a python_d.exe debug build of Python). Anyone know how to get this to happen? - Geoff From mal at lemburg.com Fri Aug 9 21:24:10 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A650@MAILBOX.nameconnector.com> Message-ID: <3D5408CA.5000902@lemburg.com> Geoffrey Talvola wrote: > For various reasons I'd like to get my hands on a debug build of mxDateTime > for Windows for Python 1.5.2. I've downloaded the source and successfully > compiled the regular release version, but I don't see any obvious way to get > it to build a debug version (i.e. the mxDateTime_d.pyd that can be used with > a python_d.exe debug build of Python). > > Anyone know how to get this to happen? python setup.py install --debug should get you there, but you are on your own then... I only rarely build a debug version myself, so it's not clear whether that setup works or not (esp. because memory allocation is different in debug builds and I know of at least one bug which will be fixed in 2.1.0). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:36:47 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > For various reasons I'd like to get my hands on a debug > build of mxDateTime > > for Windows for Python 1.5.2. I've downloaded the source > and successfully > > compiled the regular release version, but I don't see any > obvious way to get > > it to build a debug version (i.e. the mxDateTime_d.pyd that > can be used with > > a python_d.exe debug build of Python). > > > > Anyone know how to get this to happen? > > python setup.py install --debug > > should get you there, but you are on your own then... I only > rarely build a debug version myself, so it's not clear whether > that setup works or not (esp. because memory allocation is different > in debug builds and I know of at least one bug which will be > fixed in 2.1.0). Thanks. Actually, that didn't work (it didn't recognize the --debug option), but python setup.py build --debug did work and built the dlls I need. - Geoff From mal at lemburg.com Fri Aug 9 21:51:38 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime References: <61957B071FF421419E567A28A45C7FE514A654@MAILBOX.nameconnector.com> Message-ID: <3D540F3A.4040201@lemburg.com> Geoffrey Talvola wrote: > M.-A. Lemburg wrote: > >>python setup.py install --debug >> >>should get you there, but you are on your own then... I only >>rarely build a debug version myself, so it's not clear whether >>that setup works or not (esp. because memory allocation is different >>in debug builds and I know of at least one bug which will be >>fixed in 2.1.0). > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > option), but > > python setup.py build --debug > > did work and built the dlls I need. Funny, that's what I tested (since I didn't want to overwrite my installation with a debug build). It's strange how distutils sometimes support command line argument syndication and sometimes doesn't. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From gtalvola at nameconnector.com Fri Aug 9 15:56:46 2002 From: gtalvola at nameconnector.com (Geoffrey Talvola) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] Windows debug build of mxDateTime Message-ID: <61957B071FF421419E567A28A45C7FE514A655@MAILBOX.nameconnector.com> M.-A. Lemburg wrote: > Geoffrey Talvola wrote: > > M.-A. Lemburg wrote: > > > >>python setup.py install --debug > >> > >>should get you there, but you are on your own then... I only > >>rarely build a debug version myself, so it's not clear whether > >>that setup works or not (esp. because memory allocation is different > >>in debug builds and I know of at least one bug which will be > >>fixed in 2.1.0). > > > > > > Thanks. Actually, that didn't work (it didn't recognize the --debug > > option), but > > > > python setup.py build --debug > > > > did work and built the dlls I need. > > Funny, that's what I tested (since I didn't want to overwrite > my installation with a debug build). It's strange how distutils > sometimes support command line argument syndication and sometimes > doesn't. After running the above build command both with and without the --debug flag, then "python setup.py install" installed both the release _and_ debug .pyd's to the correct destination. There's no problem of overwriting the installation with a debug build because the filenames are different; mxDateTime_d.pyd gets used if you're running python_d.exe and mxDateTime.pyd gets used if you're running python.exe. They live happily side by side. This is exactly what I wanted, so I'm happy :-) - Geoff From krissepu at vip.fi Sun Aug 11 23:08:09 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] Help needed for context object in mxTextTools 2.1.0 Message-ID: <3D56B619.1060001@vip.fi> Hi, I am currently perfecting my parser by trying to add error messages to it. I found error messages mentioned in documentation were context object were explained, but had problems understanding what is meant with "context". If I understood correctly I should be able to: 1) instead of saying "MatchFail", jump to a location were I call python function that prints Errortext first and only then call "MatchFail". 2) set flag that tells I am recursing at the moment and at error check flag and print messages according to flags' value. a) Should I use Call or CallTag -function ? b) What is the difference of adding Python function to tag() -command instead of using CallTag ? c) should I use mxStack instead of a python variable for the flag ? This is a speed issue. d) Merging error printing with mxTextTools C-engine's MatchFail -state. Possible ? ---code starts --- NOTE: IF-ELSE -structure can (and must ?) be implemented with jumps. from mx.TextTools import * text = "Xaa(AA)a((BB))aa((CC)DD)aa(EE(FF))aa(GG(HH(II)JJ)KK)aaY" tables = [] tab = ('start', (None, AllNotIn,'()', +1), (None, Is+LookAhead, '(', "IF FLAG IS NOT SET PRINT ERROR 'SPURIOUS )-SIGN' and MatchFail"\ ELSE UNSET FLAG and MatchOk", 'nesting'), 'nesting', "SET FLAG ON", ('group',SubTable+AppendMatch,((None, Is, '(', +1), (None, SubTableInList, (tables,0)), (None, Is, ')', "PRINT ERROR 'SPURIOUS (-SIGN' and MatchFail", MatchOk))), (None,Jump,To,'start')) tables.append(tab) # Add tab to tables if __name__ == '__main__': result, taglist, nextindex = tag(text,tab) print taglist --code stops--- -pekka- From krissepu at vip.fi Sat Aug 17 22:10:40 2002 From: krissepu at vip.fi (Pekka Niiranen) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] Use of function in mxTextTools Message-ID: <3D5E91A0.508@vip.fi> Hi, if I call function when string matches, is it possible to specify inside function the action that is taken ? I am considering a function that checks whether a "match" is valid: if match = = valid: continue as if string matched else. continue as if match failed. In other words I should be able to include some additonal logic to simple character check in order to evaluate whether I have a valid match. That logic should be python or C -code. What I miss is access to recursion state: for example a flag that is accessible with mxTextTool's parameters and that tells wheter mxTextTools is recursing at the moment -pekka- From mcfletch at rogers.com Sun Aug 25 17:38:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Mar 31 16:33:03 2006 Subject: [egenix-users] [ANN] SimpleParse 2.0.0 final released Message-ID: <3D69404F.30501@rogers.com> I have just released version 2.0.0 of the SimpleParse parser-generation system. Version 2.0.0 is a major upgrade from SimpleParse 1.0 include a significant set of new features and a completely rewritten core engine, but it should still be compatible with your 1.0 grammars. http://simpleparse.sourceforge.net/ for optimal operation, I would suggest using Python 2.2.x and mxTextTools 2.1.x, but the package should run (though in some cases with subtle errors, particularly when using mxTextTools 2.0.x) under 1.5.2 and above with mxTextTools 2.0.x and above. About SimpleParse... SimpleParse is a BSD-licensed Python package providing a simple parser generator for use with the mxTextTools text-tagging engine. SimpleParse allows you to generate tagging tables for use with the text-tagging engine directly from your EBNF grammar. Unlike most parser generators, SimpleParse generates single-pass parsers (there is no distinct tokenization stage), an approach taken from the predecessor project (mcf.pars) which attempted to create "autonomously parsing regex objects". The resulting parsers are not as generalized as those created by, for instance, the Earley algorithm, but they do tend to be useful for the parsing of computer file formats and the like (as distinct from natural language and similar "hard" parsing problems). See: http://simpleparse.sourceforge.net/ for details and documentation. Have fun, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Tue Aug 27 11:04:00 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Mar 31 16:33:05 2006 Subject: [egenix-users] strftime restricted Message-ID: <17964083724.20020827100400@publisher.de> Hello, I installed mxDateTime 2.0.3 on Zope 2.5.1 (python 2.1). When I try to access strftime from Zope DTML documents I get an "Unauthorized" error. Any ideas? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From mcfletch at rogers.com Wed Aug 28 01:26:39 2002 From: mcfletch at rogers.com (Mike C. Fletcher) Date: Fri Mar 31 16:33:06 2006 Subject: [egenix-users] Anyone successfully compiled mxTextTools beta5 with MingW32? Message-ID: <3D6C50FF.7080505@rogers.com> I've been poking at this problem for a while now, basically, my attempts always fail with this error: c:\bin\cygwin\bin\gcc.exe -mno-cygwin -mdll -static -s build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxtexttools.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxbmse.o build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.def -LC:\bin\lang\py22\libs -L/lib -lpython22 -o build\lib.win32-2.2\mx\TextTools\mxTextTools\mxTextTools.pyd build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1b74):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x1bf0):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x2fb4):mxte.c: undefined reference to `_imp__mxTagTable_Type' build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxte.o(.text+0x3030):mxte.c: undefined reference to `_imp__mxTagTable_Type' collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1 Which, is just about what VC++6 also complains about as well: Creating library build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.lib and object build\temp.win32-2.2\Release\mx\TextTools\mxTextTools\mxTextTools\mxTextTools.exp LINK : warning LNK4049: locally defined symbol "_mxTagTable_Type" imported Now, if I understand this problem correctly, the __declspec( dllexport ) stuff that's defined in mxTextTools.h and mxh.h for mxTagTable_Type is somehow making mxTagTable_Type wind up mangled as if it were a dll-loaded function within mxte.c instead of a locally-defined but exported one? VC++ seems able to work about it, but not MingW32. I'm not really a C/C++ guy, so I'm not sure what the _solution_ to the problem would be. All discussions I can find on the web about it seem to assume it's such an obvious fix that there's no point describing it :o/ . Any suggestions welcome, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ From liste at publisher.de Wed Aug 28 10:39:19 2002 From: liste at publisher.de (Ulrich Wisser) Date: Fri Mar 31 16:33:07 2006 Subject: [egenix-users] mxDateTime and Zope Message-ID: <53149007326.20020828093919@publisher.de> Hello, after more investigation I found that mxDateTime has replaced the Zope builtin DateTime module. I belive, but did not verify, that the option --with-zope to the configure script did the trick. Anyway, this led to the fact that DateTime could no longer be used in DTML and PageTemplates. After restoring the original DateTime everything works fine. Any idea why that is so and why the option --with-zope exists if it doesn't work? Regards Ulrich -- Searchengine Know How - Webpromotion - Optimization - Internal Search World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg http://www.publisher.de Tel: +46-8-53460905 Fax: +46-8-534 609 06 From sklein at cpcug.org Mon Aug 19 14:17:10 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Mar 31 16:33:07 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base Message-ID: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> When I installed the rpm for mxDateTime, the package was installed in /usr/local. I'm running Red Hat 7.2, which complies with the Linux Standards Base (LSB). The LSB requires that packages similar to mxDateTime install in /usr/share. When I tried to run GNU Enterprise, which uses mxDateTime, I got error messages until I doscovered the problem and made a link from the directory under /usr/local to the equivalent directory under /usr/share where Python was looking for the files. I would like to suggest that the packager either make the rpms compliant with the LSB or include a README telling the user of the need to make the link. I suggest making LSB compliance the preferred approach because most of the major distributions that use rpms are also LSB compliant. Thanks. Stan Klein From tommi.auvinen at wicom.com Wed Aug 21 15:04:57 2002 From: tommi.auvinen at wicom.com (Tommi Auvinen) Date: Fri Mar 31 16:33:11 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type Message-ID: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Is it a known feature (or even a bug ;) that if data type is 'ntext' then something goes wrong around every 1024 characters? There seems to be an extra 000 (null) character. The data is fetched OK if I change the data type in DB to 'text' or change the query to something like ". CONVERT(text, Data) AS Data". R:TAU -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20020821/de7a0a21/attachment-0139.htm From ChuckEsterbrook at StockAlerts.com Sun Aug 25 02:14:00 2002 From: ChuckEsterbrook at StockAlerts.com (Chuck Esterbrook) Date: Fri Mar 31 16:33:11 2006 Subject: [egenix-users] egenix experimental installation error Message-ID: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Hi, When running "python setup.py install" in "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it can't find "gmp.h". I actually only need mxTidy (not mxNumber) so if there is some option to leave out mxNumber, that would be great. Any ideas? I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More details: [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install running install running build running build_py ... running build_ext skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) building 'mx.Number.mxNumber.mxNumber' extension gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Imx/Number/mxNumber -I/usr/include/python2.2 -c mx/Number/mxNumber/mxNumber.c -o build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o In file included from mx/Number/mxNumber/mxNumber.c:24: mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory error: command 'gcc' failed with exit status 1 -Chuck From mal at lemburg.com Sat Aug 31 23:34:54 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:11 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3D71286E.7000203@lemburg.com> Stanley A. Klein wrote: > When I installed the rpm for mxDateTime, the package was installed in > /usr/local. I'm running Red Hat 7.2, which complies with the Linux > Standards Base (LSB). The LSB requires that packages similar to mxDateTime > install in /usr/share. > > When I tried to run GNU Enterprise, which uses mxDateTime, I got error > messages until I doscovered the problem and made a link from the directory > under /usr/local to the equivalent directory under /usr/share where Python > was looking for the files. > > I would like to suggest that the packager either make the rpms compliant > with the LSB or include a README telling the user of the need to make the > link. I suggest making LSB compliance the preferred approach because most > of the major distributions that use rpms are also LSB compliant. The egenix-mx-*.rpm archives are built using Python's distutils package and this defaults to installing into the Python installation in the /usr/local tree (this is also the default location of the RPMs of Python itself). AFAIK, you can relocate the packages to other locations using RPM command line options. I'm not really sure why you'd want to install them to /usr/share, though, because the packages depend on the Python installation and include binary shared libs which are certainly not machine independent (like the files you'd normalls install in /usr/share). Perhaps you have something else in mind here ? Thanks, -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:43:42 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:11 2006 Subject: [egenix-users] egenix experimental installation error References: <20020825081400.YNLW4808.fed1mtao04.cox.net@there> Message-ID: <3D712A7E.5090701@lemburg.com> Chuck Esterbrook wrote: > Hi, > > When running "python setup.py install" in > "egenix-mx-experimental-0.6.0" as root, mxNumber complains that it > can't find "gmp.h". That's fixed in the latest beta of 0.7.0 (see the mailing list archive for download links). Building of mxNumber is made optional in those versions and the package should build without mxNumber if you don't have GMP installed. > I actually only need mxTidy (not mxNumber) so if there is some option > to leave out mxNumber, that would be great. > > Any ideas? > > I'm running Mandrake 8.1 (Linux 2.4.8-26mdk) and Python 2.2.1. More > details: > > [root@workstation egenix-mx-experimental-0.6.0]# python setup.py install > running install > running build > running build_py > ... > running build_ext > skipping 'mx.Tidy.mxTidy.mxTidy' extension (up-to-date) > skipping 'mx.URL.mxURL.mxURL' extension (up-to-date) > skipping 'mx.UID.mxUID.mxUID' extension (up-to-date) > building 'mx.Number.mxNumber.mxNumber' extension > gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC > -Imx/Number/mxNumber -I/usr/include/python2.2 -c > mx/Number/mxNumber/mxNumber.c -o > build/temp.linux-i686-2.2/mx/Number/mxNumber/mxNumber/mxNumber.o > In file included from mx/Number/mxNumber/mxNumber.c:24: > mx/Number/mxNumber/mxNumber.h:33:17: gmp.h: No such file or directory > error: command 'gcc' failed with exit status 1 > > > -Chuck > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > http://lists.egenix.com/mailman/listinfo/egenix-users -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From mal at lemburg.com Sat Aug 31 23:41:55 2002 From: mal at lemburg.com (M.-A. Lemburg) Date: Fri Mar 31 16:33:11 2006 Subject: [egenix-users] SQL Server 2000, mxODBC version 2.0.4 for Python 1.5.2 and' ntext data type References: <53404C1181500348B8F07B400D418EB10905FB@postman.wicom.com> Message-ID: <3D712A13.8030408@lemburg.com> Tommi Auvinen wrote: > Is it a known feature (or even a bug ;) that if data type is ?ntext? > then something goes wrong around every 1024 characters? There seems to > be an extra 000 (null) character. The data is fetched OK if I change the > data type in DB to ?text? or change the query to something like ?? > CONVERT(text, Data) AS Data?. ntext is managed as Unicode in SQL Server, but mxODBC requests these columns as strings (unless you set cursor.stringformat) in chunks of 1024 bytes. Could be that the ODBC driver messes up the inplace conversion of Unicode to 8-bit strings when using this kind of chunked retrieval. Have you tried this with the latest ODBC driver versions available for SQL Server ? If the problem persists, we'll have to look into adding a work-around to mxODBC. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From sklein at cpcug.org Sat Aug 31 19:11:02 2002 From: sklein at cpcug.org (Stanley A. Klein) Date: Fri Mar 31 16:33:12 2006 Subject: [egenix-users] The mxDateTime rpms are non-compliant with the Linux Standards Base In-Reply-To: <3D71286E.7000203@lemburg.com> References: <3.0.5.16.20020819131710.3c8f6c86@cpcug.org> Message-ID: <3.0.5.16.20020831181102.447fc84e@cpcug.org> I don't know about the distutils default. Perhaps all other Python rpm packagers change from the default to /usr/share during rpm packaging. I have Python 1.5 and 2.1, wxPython, and (I think) some other packages installed on my system. All of them automatically install in /usr/ahare. To the best of my knowledge that is where Python packagers are supposed to put their packages. These packages are packaged in compliance with the Linux Standards Base specification, which (I understand) may have clarified or modified for Linux the definition of what is supposed to go into /usr/share versus /usr/local. (Essentially, all downloaded packages or those supplied with distributions go into /usr/share. I don't recall the purpose assigned to /usr/local, except that it may be reserved for uniquely local packages developed by the system administrator.) mxDateTime is the only Python package installed on my system that I had to fix because it installed in /usr/local. (I fixed it by putting a link in the appropriate site-packages directory in the /usr/share tree.) Stan Klein At 10:34 PM 8/31/2002 +0200, M.-A. Lemburg wrote: >Stanley A. Klein wrote: >> When I installed the rpm for mxDateTime, the package was installed in >> /usr/local. I'm running Red Hat 7.2, which complies with the Linux >> Standards Base (LSB). The LSB requires that packages similar to mxDateTime >> install in /usr/share. >> >> When I tried to run GNU Enterprise, which uses mxDateTime, I got error >> messages until I doscovered the problem and made a link from the directory >> under /usr/local to the equivalent directory under /usr/share where Python >> was looking for the files. >> >> I would like to suggest that the packager either make the rpms compliant >> with the LSB or include a README telling the user of the need to make the >> link. I suggest making LSB compliance the preferred approach because most >> of the major distributions that use rpms are also LSB compliant. > >The egenix-mx-*.rpm archives are built using Python's distutils >package and this defaults to installing into the Python >installation in the /usr/local tree (this is also the >default location of the RPMs of Python itself). > >AFAIK, you can relocate the packages to other locations >using RPM command line options. > >I'm not really sure why you'd want to install them >to /usr/share, though, because the packages depend on >the Python installation and include binary shared libs >which are certainly not machine independent (like the >files you'd normalls install in /usr/share). Perhaps >you have something else in mind here ? > >Thanks, >-- >Marc-Andre Lemburg >CEO eGenix.com Software GmbH >_______________________________________________________________________ >eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... >Python Consulting: http://www.egenix.com/ >Python Software: http://www.egenix.com/files/python/ > > >